home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / QBWIZ12.ARJ / QBWIZ.DOC < prev    next >
Text File  |  1991-02-20  |  6KB  |  137 lines

  1.                       The QuickBASIC Wizard's Library
  2.  
  3.             QBWIZ  Copyright (c) 1990-1991  Thomas G. Hanlin III
  4.  
  5.  
  6.  
  7. This is QBWIZ, an assembly language library for use with QuickBASIC and
  8. BASCOM.  It was tested under QB 4.5 and is expected to work with QuickBASIC
  9. versions 4.0 - 4.5 and BASCOM 6.0.  Due to strong dependency on the internals
  10. of the compiler, QBWIZ probably will not work with other versions.  QBWIZ is
  11. only for stand-alone compiled programs.  It will not work with programs that
  12. require the runtime module (BRUNxx) or inside the QB environment.
  13.  
  14. The QBWIZ collection is copyrighted and may be distributed only under the
  15. following conditions:
  16.  
  17.    1) No fee of over $10.00 may be charged for distribution.  This applies
  18.       to physical copies and is not meant to prevent distribution by
  19.       telecommunications services.
  20.  
  21.    2) All QBWIZ files must be distributed together in original, unaltered
  22.       form.  This includes ACCESS.BI, ACCESS.LIB, CREATE.BAT, EXAMPLE.BAS,
  23.       FILES.LST, QBWIZ.DOC, QBWIZ.MAN, QBWIZ.NEW, and SOURCE.ZIP.
  24.  
  25. You use this library at your own risk.  It has been tested by me on my own
  26. computer, but I will not assume any responsibility for any problems which
  27. QBWIZ may cause you.  If you do encounter a problem, please let me know about
  28. it, and I will do my best to verify and repair the error.
  29.  
  30. The accompanying source code is designed for the OPTASM assembler by SLR
  31. Systems and may require minor modifications to assemble under MASM or TASM.
  32.  
  33. Note that QBWIZ will work only with stand-alone compiled BASIC programs, that
  34. is, programs compiled with the /O switch.
  35.  
  36. The QBWIZ library provides a way to access many of QuickBASIC's internal
  37. variables, which is useful in general and can be especially handy in writing
  38. generic subprograms.  The information provided allows subprograms to do
  39. whatever they may need to do and reset the original values when they exit.
  40. Among the information that may be accessed is what the current screen colors
  41. are, whether the cursor is visible (and if so, what size it is), what the
  42. current display pages are, whether redirection is in effect, and so forth.
  43. It is also possible to set certain values, like the error level to return to
  44. DOS when your program finishes.
  45.  
  46.                                    Libraries
  47.  
  48.  
  49.  
  50. If you are not familiar with libraries, you're missing a good thing.  A
  51. library is a collection of routines.  These may be subprograms or functions
  52. written in BASIC and compiled to .OBJ format, assembly language routines, or
  53. even routines written in Microsoft C, Fortran or Pascal using the "mixed
  54. language" calling conventions.  When your program is compiled, you can LINK
  55. it with one or more libraries.  The LINK utility will automatically take the
  56. routines that you use from the library and add them to your program.  A
  57. library is a great way to put together a set of standard routines which you
  58. use frequently.  Libraries of this sort can also be obtained from your local
  59. BBS or purchased outright.  Among the better general-purpose libraries
  60. available from BBSes are BASDLX, PBCLON and QB4BAS.  GLIB is also fairly
  61. good, but it's a "demo" library which can't be used to create an .EXE file.
  62. Commercial libraries are available from AJS Publishing, Crescent Software,
  63. and MicroHelp, among other vendors.
  64.  
  65. If you were to LINK a normal BASIC program, you'd probably type something
  66. like this:
  67.  
  68.    LINK program;
  69.  
  70. To use the functions in the provided ACCESS.LIB, you would type something
  71. like this instead:
  72.  
  73.    LINK program,,NUL,ACCESS;
  74.  
  75. You can use multiple libraries very easily:
  76.  
  77.    LINK program,,NUL,ACCESS+anylib;
  78.  
  79.                           QuickBASIC Access Functions
  80.  
  81.  
  82.  
  83. The QuickBASIC Access Functions are contained in the ACCESS.LIB library. The
  84. function declaration information for this library is contained in ACCESS.BI,
  85. which should be included at the top of your programs.  Either copy ACCESS.BI
  86. directly into your program or use an include statement:
  87.  
  88.    REM $INCLUDE: 'ACCESS.BI'
  89.  
  90. These functions allow you to obtain information from QuickBASIC's internal
  91. variables.  Many useful values can be obtained this way that would not be
  92. available otherwise.
  93.  
  94.  
  95. The following functions are available:
  96.  
  97. ACTPAGE%         active display page (the one read from and written to)
  98. BACKCOLOR%       current text background color
  99. BORDERCOLOR%     current border color
  100. COLORBURST%      whether color burst is on: 0 no, -1 yes
  101. COMMANDLINE$     original command line (not converted to uppercase)
  102. CRT$             type of display adapter ("MDA", "CGA", "EGA", or "VGA")
  103. CURSORSTART%     starting cursor scan line, if the cursor is visible
  104. CURSORSTOP%      ending cursor scan line, if the cursor is visible
  105. DEFSEG%          data segment defined by DEF SEG
  106. FORECOLOR%       current text foreground color
  107. PRINTERWIDTH%    width of the printer (columns)
  108. REDIRECTION%     whether output is redirected: 0 no, -1 yes
  109. SCREENHEIGHT%    height of the screen (rows)
  110. SCREENMODE%      current BASIC screen mode
  111. SCREENWIDTH%     width of the screen (columns)
  112. SHOWCURSOR%      whether the cursor is visible: 0 no, -1 yes
  113. VIEWBOTTOM%      bottom row of the screen (according to VIEW PRINT info)
  114. VIEWTOP%         top row of the screen (according to VIEW PRINT info)
  115. VISPAGE%         visible display page (the one displayed on the screen)
  116.  
  117.                         QuickBASIC Access Subprograms
  118.  
  119.  
  120.  
  121. The QuickBASIC Access Subprograms are contained in the ACCESS.LIB library.
  122. The function declaration information for this library is contained in
  123. ACCESS.BI, which should be included at the top of your programs.  Either copy
  124. ACCESS.BI directly into your program or use an include statement:
  125.  
  126.    REM $INCLUDE: 'ACCESS.BI'
  127.  
  128. These subprograms allow you to alter information in QuickBASIC's internal
  129. variables.  This allows you to accomplish some things that might not
  130. otherwise be possible.
  131.  
  132.  
  133. The following subprograms are available:
  134.  
  135. ERRLEVEL(x%)     error level to return to DOS when the program ends (0-255)
  136.  
  137.